<?php
use think\Route;

//Route::group('api', function () {
//    Route::group('v1', function () {
//        Route::get('city2/', 'City/lists');
//        Route::get('city/read/:id', 'api/v1/City/read');
//        Route::post('sms/send', 'api/controller/v1/Sms/send');
//        Route::post('upload/upload', 'admin/controller/upload/upload');
//        Route::post('user/login', 'api/v1/User/login');
//        Route::get('school2/lists', 'admin/controller/school/school/lists');
//    });
//});
Route::rule('ysapi/v1/getPromotionCode', 'app\api\controller\MiniProgram@getPromotionCode', 'GET|POST');
Route::rule('ysapi/v1/my/myclasses', 'app\api\controller\v1\My@myclasses', 'GET');
Route::rule('ysapi/v1/teacher/add_application_unit', 'app\api\controller\v1\Teacher@addApplicationUnit', 'POST');
Route::rule('ysapi/v1/teacher/getApplicationList', 'app\api\controller\v1\Teacher@getApplicationList', 'GET');
Route::rule('ysapi/v1/teacher/getApplicationInfo', 'app\api\controller\v1\Teacher@getApplicationInfo', 'GET');
Route::rule('ysapi/v1/teacher/withdraw_application', 'app\api\controller\v1\Teacher@withdrawApplication', 'POST');
Route::rule('ysapi/v1/manager/add_application_unit', 'app\api\controller\v1\Manager@addApplicationUnit', 'POST');
Route::rule('ysapi/v1/manager/getApplicationList', 'app\api\controller\v1\Manager@getApplicationList', 'GET');
Route::rule('ysapi/v1/manager/getApplicationInfo', 'app\api\controller\v1\Manager@getApplicationInfo', 'GET');
Route::rule('ysapi/v1/manager/withdraw', 'app\api\controller\v1\Manager@withdrawApplication', 'POST');
Route::rule('/api2/', function () {
    return json(['message' => 'Welcome to FastAdmin API333']);
});




Route::group('ysapi', function () {
    Route::group('v1', function () {
        Route::rule('ProjectCourse/stats', 'app\api\controller\v1\ProjectCourse@stats', 'GET');
        Route::rule('projectCourse/stats', 'app\api\controller\v1\ProjectCourse@stats', 'GET');
        Route::rule('ProjectCourse/schoolOptions', 'app\api\controller\v1\ProjectCourse@schoolOptions', 'GET');
        Route::rule('ProjectCourse/projectOptions', 'app\api\controller\v1\ProjectCourse@projectOptions', 'GET');
        Route::rule('ProjectCourse/completionStatus', 'app\api\controller\v1\ProjectCourse@completionStatus', 'GET');
        Route::rule('ProjectCourse/pointDetail', 'app\api\controller\v1\ProjectCourse@pointDetail', 'GET');
        Route::rule('ProjectCourse/correspondenceList', 'app\api\controller\v1\ProjectCourse@correspondenceList', 'GET');
        Route::rule('Pictures/upload', 'app\api\controller\v1\Pictures@upload', 'POST');
        Route::rule('pictures/upload', 'app\api\controller\v1\Pictures@upload', 'POST');
        Route::rule('Pictures/todaystatus', 'app\api\controller\v1\Pictures@todaystatus', 'GET|POST');
    });
});
Route::group('ysapi', function () {
    Route::group('v1', function () {
        Route::rule('cityarea/getAreas', 'app\api\controller\v1\Cityarea@getAreas', 'GET');
    });
});
Route::group('ysapi', function () {
    Route::group('v1', function () {
        Route::rule('statistics/schoolStats', 'app\api\controller\v1\Statistics@schoolStats', 'GET');
        Route::rule('statistics/classStats', 'app\api\controller\v1\Statistics@classStats', 'GET');
        Route::rule('statistics/classDetail', 'app\api\controller\v1\Statistics@classDetail', 'GET');
        Route::rule('teach/offline', 'app\api\controller\v1\TeachOffline@index', 'GET');
        Route::rule('teach/online', 'app\api\controller\v1\TeachOnline@index', 'GET');
        Route::rule('course/calendar', 'app\api\controller\v1\CourseManage@calendar', 'GET');
        Route::rule('course/query', 'app\api\controller\v1\CourseManage@query', 'GET');
        Route::rule('course/detail', 'app\api\controller\v1\CourseManage@detail', 'GET');
        Route::rule('attendance/query', 'app\api\controller\v1\Attendance@query', 'GET');
    });
});
